<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<ui:composition template="../template/layout.xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	<ui:param name="pageHeaderTitle" value="Edit your profile" />
	<ui:param name="pageTitle" value="Edit your profile" />
	<ui:define name="content">
		<div id="inner_content">
			<h:form>
				<h:panelGrid columns="2" 					
					cellpadding="8" style="width: 550px">
					
					<h:panelGroup>
						<p:outputLabel value="First Name:" for="firstName" />
						<br />
						<p:inputText id="firstName"
							value="#{editDoctorBean.doctor.firstName}" maxlength="30" />
					</h:panelGroup>
					
					<h:panelGroup>
						<br />
						<p:message for="firstName" />
					</h:panelGroup>

					<h:panelGroup>
						<p:outputLabel value="Last Name:" for="lastName" />
						<br />
						<p:inputText id="lastName"
							value="#{editDoctorBean.doctor.lastName}" maxlength="30" />
					</h:panelGroup>
					
					<h:panelGroup>
						<br />
						<p:message for="lastName" />
					</h:panelGroup>

					<h:panelGroup>
						<p:outputLabel value="Telephone:" for="phone" />
						<br />
						<p:inputMask id="phone" value="#{editDoctorBean.doctor.phone}"
							mask="(999) 999-9999" />
					</h:panelGroup>
					
					<h:panelGroup>
						<br />
						<p:message for="phone" />
					</h:panelGroup>

					<h:panelGroup>
						<p:outputLabel value="Specialty:" for="selectSpecialty" />
						<br />
						<p:selectOneMenu id="selectSpecialty" panelStyle="width:150px"
							style="width:160px" converter="stringToDoctorSpecialtyConverter"
							value="#{editDoctorBean.doctor.spec}">
							<f:selectItems value="#{editDoctorBean.doctorSpecialtyList}" />
						</p:selectOneMenu>
					</h:panelGroup>
					
					<h:panelGroup>
					</h:panelGroup>

					<h:panelGroup>
						<p:outputLabel value="Information:" for="description" />
						<br />
						<p:inputTextarea id="description" style="width: 260px" rows="20" cols="50"
							autoResize="false" styleClass="info_area"
							value="#{editDoctorBean.doctor.desc}" maxlength="250" />
					</h:panelGroup>
					
					<h:panelGroup>
						<br />
						<p:message for="description" />
					</h:panelGroup>

					<h:panelGroup>
						<br />
						<p:commandButton value="Submit"
							action="#{editDoctorBean.editDoctor()}"
							styleClass="pCommandButton" ajax="false" />
					</h:panelGroup>
					
				</h:panelGrid>
			</h:form>
		</div>
	</ui:define>
</ui:composition>
</html>